#!/bin/bash
## dependencies: openvpn, rofi
## Original source https://github.com/arnarg/dotfiles/blob/master/i3/scripts/start-vpn.sh

cd /etc/openvpn/client

VPN=$(ls *.ovpn | rofi -dmenu -p "VPN: ")

[ -z "$VPN" ] && exit

urxvt -e /bin/bash -c "sudo openvpn /etc/openvpn/client/$VPN"

exit
